{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "import cv2\n",
    "import numpy as np\n",
    "import torch\n",
    "import torchvision\n",
    "from torch import nn\n",
    "import torch.nn.functional as F\n",
    "from matplotlib import pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "IMG_PATH = \"./raw_pic/nums_set.jpg\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 使用opencv展示图片\n",
    "def img_show_cv(img_name, img):\n",
    "    cv2.imshow(img_name, img)\n",
    "    cv2.waitKey(0)\n",
    "    cv2.destroyAllWindows()\n",
    "\n",
    "# 使用matplotlib展示图片\n",
    "def img_show_plt(img):\n",
    "    plt.imshow(img, cmap=\"gray\")\n",
    "    plt.show()\n",
    "\n",
    "# 导入模型\n",
    "class CNN(nn.Module):\n",
    "    def __init__(self):\n",
    "        super(CNN,self).__init__()\n",
    "        self.conv1 = nn.Conv2d(1,32,kernel_size=3,stride=1,padding=1)\n",
    "        self.pool = nn.MaxPool2d(2,2)\n",
    "        self.conv2 = nn.Conv2d(32,64,kernel_size=3,stride=1,padding=1)\n",
    "        # 两个池化，所以是7*7而不是14*14\n",
    "        self.fc1 = nn.Linear(64*7*7,1024)\n",
    "        self.fc2 = nn.Linear(1024,512)\n",
    "        self.fc3 = nn.Linear(512,10)\n",
    "\n",
    "    def forward(self,x):\n",
    "        x = self.pool(F.relu(self.conv1(x)))\n",
    "        x = self.pool(F.relu(self.conv2(x)))\n",
    "        # 将数据平整为一维的\n",
    "        x = x.view(-1, 64 * 7* 7)\n",
    "        x = F.relu(self.fc1(x))\n",
    "        x = F.relu(self.fc2(x))\n",
    "        x = self.fc3(x)\n",
    "        return x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 读取原图像\n",
    "# img = cv2.imread(IMG_PATH)\n",
    "# img_show_plt(img)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAGiCAYAAAAvJFsuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAulElEQVR4nO3deXRUZZ7/8U9lqwChKiSYFNEEUFCMLCqb5daORAJExyVnRoHWaNPYMgEFWtTYiI3t6TDotNsgeqZt0BmRbjziwgiaZomNRsBoBEEzStMmSioR6FQFkJDl+f3hoX5dBrtJ8iQ3gffrnHsO97nPvfd7H7E+1N3KZYwxAgDAgiinCwAAnDwIFQCANYQKAMAaQgUAYA2hAgCwhlABAFhDqAAArCFUAADWECoAAGsIFQCANY6GypIlSzRgwADFx8dr7Nix2rp1q5PlAADaybFQ+f3vf6+5c+fqwQcf1IcffqgRI0YoOztbNTU1TpUEAGgnl1MvlBw7dqxGjx6t//zP/5QkNTc3Kz09XbNmzdJ9993nREkAgHaKcWKnR48eVWlpqQoKCsJtUVFRysrKUklJSYv+9fX1qq+vD883NzfrwIEDSk5Olsvl6pSaAeBkZYxRXV2d0tLSFBXVvhNYjoTKvn371NTUpNTU1Ij21NRUffbZZy36FxYWauHChZ1VHgCckiorK3XGGWe0axuOhEprFRQUaO7cueH5YDCojIwMVVZWyuPxOFgZAHR/oVBI6enp6t27d7u35Uio9O3bV9HR0aquro5or66uls/na9Hf7XbL7Xa3aPd4PIQKAFhi43KCI3d/xcXFaeTIkVq/fn24rbm5WevXr5ff73eiJACABY6d/po7d67y8vI0atQojRkzRo8//rgOHTqk2267zamSAADt5Fio3Hjjjfrmm2+0YMECBQIBnX/++Vq3bl2Li/cAgO7DsedU2iMUCsnr9SoYDHJNBQDayeZnKu/+AgBYQ6gAAKwhVAA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BQ2b96sCRMm6NChQxHt0dHRevbZZ/XTn/7Uocpap7y8XDNnztTvf/97p0sB2oRrKh3szjvvdLqEU8KcOXNaBIokNTU1dZtAAU4GhEoHmzdvntMlnPSefvppffHFF06XAUCc/nLEVVddpc8++4wLshb8z//8j+6//34Fg8FWr+tyuTqgotbpzF/zfu655/TII4902v460gcffKCEhASny2jhq6++UlZWVkRbnz59VFJS4lBFnY9QccCf//znTv0wOZnV19ervr4+PB8dHa2kpKTwfExMjDZu3KjLLrss3OZyufT5558rLi6uU2s9nv/6r//qlFOkDQ0NqqioUHl5eYfvqzOceeaZqqmpcbqMFhoaGlqM8al20wWhgm5t2rRp2r9/v371q1/p8OHDuuWWW/S73/2uRb+u+AEkSbGxsZ2yn02bNumhhx7qlH11hr/9hwS6FkLlFPX000+rqakpPD958mT17dvXwYra7p577lFUVJQCgYAeffRRp8tpl6SkJE2YMMH6djMyMnTxxRfrvffes75t4G8RKqege+65R//xH/8R8cDf5Zdf3m1DRZLuvvtup0uwwufz6bbbbrO+3XPOOUfXXnstoYIOR6icglatWtVlniA/le3YsUOFhYWdtr+8vDyNGzeu0/Zny759+zrk2xs6BqECSdL48eO1e/fuLnlHzcnq4MGDqqio6LT9paamKjU1tdP2Z0sgEHC6hBM2YMAArVy5UjfddFO47Vgorlu3zsHKOg/PqUCS9PbbbxMoDnO5XMrMzHS6DLSDy+VSz549I9qMMcd9MPdkRagAXUR8fHyXeQcZ0FaECgDAGkLFAc3NzRHnXAHgZEGodLD4+Hi9++67iomJvCdi9erV+td//VeHqgK6t67wNgQcH6HSCS6++GKtWLEioq25uVl//etfHaoI6D7+/Oc/t2jbvXu3A5XgRLQqVAoLCzV69Gj17t1bKSkpuu6661q85+bIkSPKz89XcnKyEhISlJubq+rq6og+FRUVysnJUc+ePZWSkqJ58+apsbGx/UfThXWFlxcC3Y0xRldccUWL9qgo/j3cVbXqv0xxcbHy8/P1/vvvq6ioSA0NDRo/fnzE7XJz5szRG2+8oVWrVqm4uFh79+7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4889thjioqKUm5ururr65Wdna2nn346vDw6Olpr1qzRjBkz5Pf71atXL+Xl5emhhx6yXQoAoJO5jDHG6SJaKxQKyev1KhgMcn0FANrJ5mcq7/4CAFhDqAAArCFUAADWECoAAGsIFQCANYQKAMAaQgUAYA2hAgCwhlABAFhDqAAArCFUAADWECoAAGsIFQCANYQKAMAaQgUAYA2hAgCwhlABAFhDqAAArCFUAADWECoAAGsIFQCANYQKAMAaQgUAYA2hAgCwhlABAFgT43QBbWGMkSSFQiGHKwGA7u/YZ+mxz9b26JahUldXJ0lKT093uBIAOHnU1dXJ6/W2axsuYyOaOllzc7PKy8uVmZmpyspKeTwep0vq9kKhkNLT0xlPSxhPuxhPu74/nsYY1dXVKS0tTVFR7bsq0i2/qURFRen000+XJHk8Hv6SWcR42sV42sV42vW349nebyjHcKEeAGANoQIAsKbbhorb7daDDz4ot9vtdCknBcbTLsbTLsbTro4cz255oR4A0DV1228qAICuh1ABAFhDqAAArCFUAADWdMtQWbJkiQYMGKD4+HiNHTtWW7dudbqkLumdd97RNddco7S0NLlcLr366qsRy40xWrBggfr166cePXooKytLn3/+eUSfAwcOaOrUqfJ4PEpMTNS0adN08ODBTjyKrqGwsFCjR49W7969lZKSouuuu07l5eURfY4cOaL8/HwlJycrISFBubm5qq6ujuhTUVGhnJwc9ezZUykpKZo3b54aGxs781C6hKVLl2r48OHhh+/8fr/Wrl0bXs5Yts+iRYvkcrk0e/bscFunjanpZlauXGni4uLM7373O7Nz504zffp0k5iYaKqrq50urct58803zS9+8QvzyiuvGElm9erVEcsXLVpkvF6vefXVV83HH39s/vmf/9kMHDjQfPvtt+E+EyZMMCNGjDDvv/+++dOf/mQGDRpkJk+e3MlH4rzs7GyzbNky88knn5iysjIzadIkk5GRYQ4ePBjuc8cdd5j09HSzfv1688EHH5iLLrrIXHzxxeHljY2NZujQoSYrK8t89NFH5s033zR9+/Y1BQUFThySo15//XXzv//7v+b//u//THl5ubn//vtNbGys+eSTT4wxjGV7bN261QwYMMAM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o1apSmTp0a/nOnjamVWw460cqVK43b7TbLly83u3btMrfffrtJTEyMuGMB36mrqzMfffSR+eijj4wk85vf/MZ89NFH5ssvvzTGfHdLcWJionnttdfM9u3bzbXXXnvcW4ovuOACs2XLFrN582YzePDgU/KW4hkzZhiv12s2bdpkqqqqwtPhw4fDfe644w6TkZFhNmzYYD744APj9/uN3+8PLz92y+b48eNNWVmZWbdunTnttNNOydtg77vvPlNcXGz27Nljtm/fbu677z7jcrnM22+/bYxhLG3427u/jOm8Me12oWKMMU899ZTJyMgwcXFxZsyYMeb99993uqQuaePGjUZSiykvL88Y891txQ888IBJTU01brfbjBs3zpSXl0dsY//+/Wby5MkmISHBeDwec9ttt5m6ujoHjsZZxxtHSWbZsmXhPt9++635t3/7N9OnTx/Ts2dPc/3115uqqqqI7fzlL38xEydOND169DB9+/Y1P//5z01DQ0MnH43zfvKTn5j+/fubuLg4c9ppp5lx48aFA8UYxtKG74dKZ40pr74HAFjTra6pAAC6NkIFAGANoQIAsIZQAQBYQ6gAAKwhVAAA1hAqAABrCBUAgDWECgDAGkIFAGANoQIAsIZQAQBY8/8A98X+umxoueEAAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "img = cv2.imread(IMG_PATH)\n",
    "# 二值化\n",
    "_, img_bin = cv2.threshold(img, 125, 255, cv2.THRESH_BINARY)\n",
    "# 灰度\n",
    "img_bin = cv2.cvtColor(img_bin, cv2.COLOR_BGR2GRAY)\n",
    "img_show_plt(img_bin)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAGiCAYAAAAvJFsuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMA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P0ePHjVTp0413bp1M0lJSebBBx80tbW1bfxs3Hf33XebQYMGmdjYWJOcnGwmTZrkBIoxnEsbvh0qbXVOufU9AMCaDnVNBQDQvhEqAABrCBUAgDWECgDAGkIFAGANoQIAsIZQAQBYQ6gAAKwhVAAA1hAqAABrCBUAgDWECgDAmv8HJUqAA/2lU1sAAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 反相灰度图，将黑白阈值颠倒\n",
    "def accessPiexl(img):\n",
    "    height = img.shape[0]\n",
    "    width = img.shape[1]\n",
    "    for i in range(height):\n",
    "       for j in range(width):\n",
    "           img[i][j] = 255 - img[i][j]\n",
    "    return img\n",
    "\n",
    "# 反相二值化图像\n",
    "def accessBinary(img, threshold=128):\n",
    "    img = accessPiexl(img)\n",
    "    # 边缘膨胀，不加也可以\n",
    "    kernel = np.ones((3, 3), np.uint8)\n",
    "    img = cv2.dilate(img, kernel, iterations=1)\n",
    "    _, img = cv2.threshold(img, threshold, 0, cv2.THRESH_TOZERO)\n",
    "    return img\n",
    "\n",
    "img_bin_back = accessBinary(img_bin)\n",
    "img_show_plt(img_bin_back)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(440, 406, 3)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAGiCAYAAAAvJFsuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAABMcElEQVR4nO3de3hU9YE//vfcc50JCSRDICDegAiBCoizdtGVlIBZq5Vn64UqWoo/Mbgiu66ma221u41Vv2ttq7jfp11xv1uKS7fISkVFULwQEKPIPQpeEi6TQEJmcpv75/fH8PnknCGoSU4yk+T9ep55YGbOzJw5OXPe53M9JiGEABERkQHMyV4BIiIaOhgqRERkGIYKEREZhqFCRESGYagQEZFhGCpERGQYhgoRERmGoUJERIZhqBARkWEYKkREZJikhsozzzyD8847D2lpaZg9ezbef//9ZK4OERH1UdJC5cUXX8TKlSvx05/+FB9++CGmTZuGsrIyNDY2JmuViIioj0zJmlBy9uzZmDVrFn77298CAGKxGIqKinDPPffgwQcfTMYqERFRH1mT8aGhUAg1NTWorKxUj5nNZpSWlqK6uvqs5YPBIILBoLofi8XQ3NyMvLw8mEymAVlnIqKhSgiB1tZWFBYWwmzuWwVWUkLl1KlTiEajKCgo0D1eUFCAQ4cOnbV8VVUVHnnkkYFaPSKiYam+vh5jx47t03skJVR6qrKyEitXrlT3fT4fxo0bh/r6ejidziSuGRHR4Of3+1FUVITs7Ow+v1dSQmXkyJGwWCxoaGjQPd7Q0AC3233W8g6HAw6H46zHnU4nQ4WIyCBGNCckpfeX3W7HjBkzsGXLFvVYLBbDli1b4PF4krFKRERkgKRVf61cuRKLFy/GzJkzcdlll+FXv/oV2tvbcccddyRrlYiIqI+SFio33ngjTp48iYcffhherxfTp0/Hq6++elbjPRERDR5JG6fSF36/Hy6XCz6fj20qRER9ZOQxlXN/ERGRYRgqRERkGIYKEREZhqFCRESGYagQEZFhGCpERGQYhgoRERmGoUJERIZhqBARkWEYKkREZBiGChERGYahQkREhmGoEBGRYRgqRERkGIYKEREZhqFCRESGYagQEZFhGCpERGQYhgoRERmGoUJERIZhqBARkWEYKkREZBiGChERGYahQkREhmGoEBGRYRgqRERkGIYKEREZhqFCRESGYagQEZFhGCpERGQYhgoRERnG8FD52c9+BpPJpLtNmjRJPR8IBFBRUYG8vDxkZWVh4cKFaGhoMHo1iIgoCfqlpHLJJZfgxIkT6vbuu++q5+677z68/PLLWLduHbZt24bjx4/jhhtu6I/VICKiAWbtlze1WuF2u8963Ofz4fe//z3WrFmDq6++GgDw/PPPY/LkydixYwcuv/zy/l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xd69e7F79251mzlzJhYtWqT+P2Db1JAuBwNo7dq1wuFwiNWrV4sDBw6IO++8U+Tk5Oh6LFBca2ur+Oijj8RHH30kAIh/+7d/Ex999JH48ssvhRDxLsU5OTliw4YNYs+ePeK6667rtkvxt771LbFz507x7rvviosuumhYdiletmyZcLlc4q233hInTpxQt46ODrXMXXfdJcaNGye2bt0qPvjgA+HxeITH41HPyy6b8+bNE7t37xavvvqqGDVq1LDsBvvggw+Kbdu2ic8//1zs2bNHPPjgg8JkMonXX39dCMFtaQRt7y8hBm6bDrpQEUKI3/zmN2LcuHHCbreLyy67TOzYsSPZq5SS3nzzTQHgrNvixYuFEPFuxT/5yU9EQUGBcDgcYu7cuaK2tlb3Hk1NTeLmm28WWVlZwul0ijvuuEO0trYm4dskV3fbEYB4/vnn1TKdnZ3i7rvvFiNGjBAZGRnie9/7njhx4oTufb744guxYMECkZ6eLkaOHCn+4R/+QYTD4QH+Nsn3wx/+UIwfP17Y7XYxatQoMXfuXBUoQnBbGiExVAZqm3LqeyIiMsygalMhIqLUxlAhIiLDMFSIiMgwDBUiIjIMQ4WIiAzDUCEiIsMwVIiIyDAMFSIiMgxDhYiIDMNQISIiwzBUiIjIMAwVIiIyzP8PtohU+lAbG1oAAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 根据长向量找出顶点\n",
    "def extractPeek(array_vals, min_vals=10, min_rect=20):\n",
    "    extrackPoints = []\n",
    "    startPoint = None\n",
    "    endPoint = None\n",
    "    for i, point in enumerate(array_vals):\n",
    "        if point > min_vals and startPoint == None:\n",
    "            startPoint = i\n",
    "        elif point < min_vals and startPoint != None:\n",
    "            endPoint = i\n",
    "\n",
    "        if startPoint != None and endPoint != None:\n",
    "            extrackPoints.append((startPoint, endPoint))\n",
    "            startPoint = None\n",
    "            endPoint = None\n",
    "\n",
    "    # 剔除一些噪点\n",
    "    for point in extrackPoints:\n",
    "        if point[1] - point[0] < min_rect:\n",
    "            extrackPoints.remove(point)\n",
    "    return extrackPoints\n",
    "\n",
    "# 寻找边缘，返回边框的左上角和右下角（利用直方图寻找边缘算法（需行对齐））\n",
    "def findBorderHistogram(img):\n",
    "    borders = []\n",
    "    # 行扫描\n",
    "    hori_vals = np.sum(img, axis=1)\n",
    "    hori_points = extractPeek(hori_vals)\n",
    "    # 根据每一行来扫描列\n",
    "    for hori_point in hori_points:\n",
    "        extractImg = img[hori_point[0]:hori_point[1], :]\n",
    "        vec_vals = np.sum(extractImg, axis=0)\n",
    "        vec_points = extractPeek(vec_vals, min_rect=0)\n",
    "        for vect_point in vec_points:\n",
    "            border = [(vect_point[0], hori_point[0]), (vect_point[1], hori_point[1])]\n",
    "            borders.append(border)\n",
    "    return borders\n",
    "\n",
    "# 显示结果及边框\n",
    "def showResults(img, borders, results=None):\n",
    "    # 绘制\n",
    "    print(img.shape)\n",
    "    for i, border in enumerate(borders):\n",
    "        cv2.rectangle(img, border[0], border[1], (0, 0, 255))\n",
    "        if results:\n",
    "            cv2.putText(img, str(results[i]), border[0], cv2.FONT_HERSHEY_COMPLEX, 0.8, (0, 255, 0), 1)\n",
    "    img_show_plt(img)\n",
    "\n",
    "borders = findBorderHistogram(img_bin)\n",
    "showResults(img, borders)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[4]\n",
      "[7]\n",
      "[7]\n",
      "[1]\n"
     ]
    }
   ],
   "source": [
    "# 根据边框转换为MNIST格式\n",
    "def transMNIST(img, borders, size=(28, 28)):\n",
    "    imgData = np.zeros((len(borders), size[0], size[0]), dtype='uint8')\n",
    "    img = accessBinary(img)\n",
    "    for i, border in enumerate(borders):\n",
    "        borderImg = img[border[0][1]:border[1][1], border[0][0]:border[1][0]]\n",
    "        # 根据最大边缘拓展像素\n",
    "        extendPiexl = (max(borderImg.shape) - min(borderImg.shape)) // 2\n",
    "        targetImg = cv2.copyMakeBorder(borderImg, 7, 7, extendPiexl + 7, extendPiexl + 7, cv2.BORDER_CONSTANT)\n",
    "        targetImg = cv2.resize(targetImg, size)\n",
    "        imgData[i] = targetImg\n",
    "    return imgData\n",
    "\n",
    "model = CNN()\n",
    "model.load_state_dict(torch.load(\"./mnist_net.pth\", map_location=torch.device('cpu'))) # 加载State模型\n",
    "# model.to('cuda') # 加载数据到GPU\n",
    "model.eval()\n",
    "\n",
    "borders = findBorderHistogram(img_bin)\n",
    "img_bin_back = accessBinary(img_bin)\n",
    "imgData = transMNIST(img_bin_back, borders)\n",
    "with torch.no_grad():\n",
    "    for i, img in enumerate(imgData):\n",
    "        name = './cut_dir/test_' + str(i) + '.jpg'\n",
    "        cv2.imwrite(name, img)\n",
    "        # print(img.shape)\n",
    "        img = np.array(img).astype(np.float32)\n",
    "        img = np.expand_dims(img, axis=0)\n",
    "        img_tensor = torch.from_numpy(img)\n",
    "        # i = img_tensor.to(\"cuda\")\n",
    "        i = img_tensor\n",
    "        _, preds = torch.max(model(i), dim=1)\n",
    "        print(preds.cpu().numpy())"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
